/* Copyright (C) 2007 Notyet

这是algebra库的一部分。

algebra是一个基于C开发的库，旨在解决代数式化简与解简单方程的问题。

联系方式：
E-Mail:nt1900@gmail.com  */

#include "libalgebra.h"
#define ALG_VAR_HERE

//------------------BUILD DLL
#ifdef _ALG_BUILD_WIN32_DLL

#include <windows.h>
BOOL APIENTRY DllMain (HINSTANCE hInst     /* Library instance handle. */ ,
                       DWORD reason        /* Reason this function is being called. */ ,
                       LPVOID reserved     /* Not used. */ )
{
    switch (reason)
    {
      case DLL_PROCESS_ATTACH:
        break;

      case DLL_PROCESS_DETACH:
        break;

      case DLL_THREAD_ATTACH:
        break;

      case DLL_THREAD_DETACH:
        break;
    }

    /* Returns TRUE on success, FALSE on failure */
    return TRUE;
}

#endif /* _ALG_BUILD_WIN32_DLL */
//------------------


DLLIMPORT int alg_init()
{
	/* 消息缓冲区初始化 */
	#ifdef ALG_BUILD_SHOW_DETAIL
	int  i;
	for(i=0;i<ALG_INFO_BUF_LEN;i++)alg_info_buf[i]='\0';
	#endif /* ALG_BUILD_SHOW_DETAIL */
	
	/* FORMULA 模块初始化 */
	alg_formula_init();
	
	/* LETTER 模块初始化 */
	alg_letter_init();
	
	/* CONVERTER 模块初始化 */
	alg_converter_init();
	
	return 1; 
}
DLLIMPORT int alg_check_show_detail()
{
	#ifdef ALG_BUILD_SHOW_DETAIL
	return 1;
	#else
	return 0;
	#endif /* ALG_BUILD_SHOW_DETAIL */
}

DLLIMPORT char* alg_about()
{
	return "LibAlgebra  (developing)\nCopyright (c) 2007 Notyet";
}
